﻿#include "derforpasswdprodpanel.h"
#include "ui_derforpasswdprodpanel.h"
#include "createalotofpasswords.h"

#include <QApplication>
#include <QClipboard>
#include <QMimeData>
#include <QTimer>
#include <QTextCodec>
#include <QRegExpValidator>
#include <QTextStream>

DerForPasswdProdPanel::DerForPasswdProdPanel(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::DerForPasswdProdPanel)
{
    ui->setupUi(this);

    this->setMinimumWidth(795);
    this->setMinimumHeight(850);

    pAppBase = new AppBase();
    /*
     * 定时器，用于显示倒计时。
     * */
    objTimDJS = new QTimer(this);
    objTimDJS->stop();
    objTimDJS->setInterval(1000);

    DerForPasswdProdPanel::funVoidOfDisPasswd(); // 生产密码，用密码初始化label
    DerForPasswdProdPanel::funVoidControlInitialize(this); // 控件属性初始化

    /*
     * 读取 qss 皮肤文件
     * */
    QFile objFileSkin(":/res/Style/skin.qss");
    QString varQStrSkin;
    if(objFileSkin.open(QIODevice::ReadOnly | QIODevice::Text))
    {
        QTextStream qssInput(&objFileSkin);
        while(!qssInput.atEnd())
        {
            varQStrSkin += qssInput.readLine();
        }
    }
    objFileSkin.close();
    this->setStyleSheet(varQStrSkin);

    /*
     * 信号 槽
     * */
    QObject::connect(objTimDJS,&QTimer::timeout,this,&::DerForPasswdProdPanel::slot_objTimerDJS_timeout); // 用于倒计时的
}

DerForPasswdProdPanel::~DerForPasswdProdPanel()
{
    // 保存标签页位置
    varCurrentTab = QString::number(ui->tabWidOfDisPasswd1->currentIndex());
    pAppBase->funVoidWriteConfig("Passwd","tabOfPass",varCurrentTab);
    delete ui;
}

// 第一标签页 密码生产按钮（刷新密码） 刷新密码 按钮单击事件
void DerForPasswdProdPanel::on_pusButOfRsetPasswd1_0_1_clicked()
{
    DerForPasswdProdPanel::funVoidOfDisPasswd();
}

// 第二标签页 密码生产按钮（刷新密码） 刷新密码 按钮单击事件
void DerForPasswdProdPanel::on_pusButOfRsetPasswd2_0_1_clicked()
{
    DerForPasswdProdPanel::funVoidOfDisPasswd();
}

// 用于驱动密码生产模块生产密码
void DerForPasswdProdPanel::funVoidOfDisPasswd() const
{
    // 读取标签页位置记录
    QString varQStrConfig = "";
    varQStrConfig = pAppBase->funQStrReadConfig("Passwd","tabOfPass");
    ui->tabWidOfDisPasswd1->setCurrentIndex(varQStrConfig.toInt());

    std::string varStrTemp_1 = "";
    /*
     * 建立临时变量
     * 第一标签 . 第一组
     * */
    std::string varStr1_1_1 = "";
    std::string varStr1_1_2 = "";
    std::string varStr1_1_3 = "";
    std::string varStr1_1_4 = "";
    std::string varStr1_1_5 = "";
    std::string varStr1_1_6 = "";

    /*
     * 建立临时变量
     * 第一标签 . 第二组
     * */
    std::string varStr1_2_1 = "";
    std::string varStr1_2_2 = "";
    std::string varStr1_2_3 = "";
    std::string varStr1_2_4 = "";
    std::string varStr1_2_5 = "";
    std::string varStr1_2_6 = "";

    /*
     * 建立临时变量
     * 第一标签 . 第三组
     * */
    std::string varStr1_3_1 = "";
    std::string varStr1_3_2 = "";
    std::string varStr1_3_3 = "";
    std::string varStr1_3_4 = "";
    std::string varStr1_3_5 = "";
    std::string varStr1_3_6 = "";

    /*
     * 建立临时变量
     * 第一标签 . 第四组
     * */
    std::string varStr1_4_1 = "";
    std::string varStr1_4_2 = "";
    std::string varStr1_4_3 = "";
    std::string varStr1_4_4 = "";

    /*
     * 建立临时变量
     * 第二标签页 . 第一组
     * */
    std::string varStr2_1_1 = "";
    std::string varStr2_1_2 = "";
    std::string varStr2_1_3 = "";
    std::string varStr2_1_4 = "";

    /*
     * 建立临时变量
     * 第二标签页 . 第二组
     * */
    std::string varStr2_2_1 = "";
    std::string varStr2_2_2 = "";

    /*
     * 建立临时变量
     * 第二标签页 . 第三组
     * */
    std::string varStr2_3_1 = "";
    std::string varStr2_3_2 = "";

    /*
     * 建立临时变量
     * 第二标签页 . 第四组
     * */
    std::string varStr2_4_1 = "";
    std::string varStr2_4_2 = "";
    std::string varStr2_4_3 = "";
    std::string varStr2_4_4 = "";

    /*
     * 建立临时变量
     * 第二标签页 . 第五组
     * */
    std::string varStr2_5_1 = "";
    std::string varStr2_5_2 = "";


    /*
     * 密码生产对象
     * */
    CreateALotOfPasswords* pCALOP = new CreateALotOfPasswords;

    /*
     * 获取密码
     * 第一标签 . 第一组
     * */
    varStr1_1_1 = pCALOP->funStrOfProdRanNumPasswds(10,1);
    varStr1_1_2 = pCALOP->funStrOfProdRanNumPasswds(10,1);
    varStr1_1_3 = pCALOP->funStrOfProdRanNumPasswds(10,1);
    varStr1_1_4 = pCALOP->funStrOfProdRanNumPasswds(10,1);
    varStr1_1_5 = pCALOP->funStrOfProdRanNumPasswds(10,1);
    varStr1_1_6 = pCALOP->funStrOfProdRanNumPasswds(10,1);
    ui->labOfDisPasswd1_1_1->setText(QString::fromStdString(varStr1_1_1));
    ui->labOfDisPasswd1_1_2->setText(QString::fromStdString(varStr1_1_2));
    ui->labOfDisPasswd1_1_3->setText(QString::fromStdString(varStr1_1_3));
    ui->labOfDisPasswd1_1_4->setText(QString::fromStdString(varStr1_1_4));
    ui->labOfDisPasswd1_1_5->setText(QString::fromStdString(varStr1_1_5));
    ui->labOfDisPasswd1_1_6->setText(QString::fromStdString(varStr1_1_6));

    /*
     * 获取密码
     * 第一标签 . 第二组
     * */
    varStr1_2_1 = pCALOP->funStrOfProdRanNumPasswds(15,1);
    varStr1_2_2 = pCALOP->funStrOfProdRanNumPasswds(15,1);
    varStr1_2_3 = pCALOP->funStrOfProdRanNumPasswds(15,1);
    varStr1_2_4 = pCALOP->funStrOfProdRanNumPasswds(15,2);
    varStr1_2_5 = pCALOP->funStrOfProdRanNumPasswds(15,2);
    varStr1_2_6 = pCALOP->funStrOfProdRanNumPasswds(15,2);
    ui->labOfDisPasswd1_2_1->setText(QString::fromStdString(varStr1_2_1));
    ui->labOfDisPasswd1_2_2->setText(QString::fromStdString(varStr1_2_2));
    ui->labOfDisPasswd1_2_3->setText(QString::fromStdString(varStr1_2_3));
    ui->labOfDisPasswd1_2_4->setText(QString::fromStdString(varStr1_2_4));
    ui->labOfDisPasswd1_2_5->setText(QString::fromStdString(varStr1_2_5));
    ui->labOfDisPasswd1_2_6->setText(QString::fromStdString(varStr1_2_6));

    /*
     * 获取密码
     * 第一标签 . 第三组
     * */
    varStr1_3_1 = pCALOP->funStrOfProdRanNumPasswds(20,1);
    varStr1_3_2 = pCALOP->funStrOfProdRanNumPasswds(20,1);
    varStr1_3_3 = pCALOP->funStrOfProdRanNumPasswds(20,1);
    varStr1_3_4 = pCALOP->funStrOfProdRanNumPasswds(20,2);
    varStr1_3_5 = pCALOP->funStrOfProdRanNumPasswds(20,2);
    varStr1_3_6 = pCALOP->funStrOfProdRanNumPasswds(20,2);
    ui->labOfDisPasswd1_3_1->setText(QString::fromStdString(varStr1_3_1));
    ui->labOfDisPasswd1_3_2->setText(QString::fromStdString(varStr1_3_2));
    ui->labOfDisPasswd1_3_3->setText(QString::fromStdString(varStr1_3_3));
    ui->labOfDisPasswd1_3_4->setText(QString::fromStdString(varStr1_3_4));
    ui->labOfDisPasswd1_3_5->setText(QString::fromStdString(varStr1_3_5));
    ui->labOfDisPasswd1_3_6->setText(QString::fromStdString(varStr1_3_6));

    /*
     * 获取密码
     * 第一标签 . 第四组
     * */
    varStr1_4_1 = pCALOP->funStrOfProdRanNumPasswds(30,1);
    varStr1_4_2 = pCALOP->funStrOfProdRanNumPasswds(30,1);
    varStr1_4_3 = pCALOP->funStrOfProdRanNumPasswds(30,2);
    varStr1_4_4 = pCALOP->funStrOfProdRanNumPasswds(30,2);
    ui->labOfDisPasswd1_4_1->setText(QString::fromStdString(varStr1_4_1));
    ui->labOfDisPasswd1_4_2->setText(QString::fromStdString(varStr1_4_2));
    ui->labOfDisPasswd1_4_3->setText(QString::fromStdString(varStr1_4_3));
    ui->labOfDisPasswd1_4_4->setText(QString::fromStdString(varStr1_4_4));

    /*
     * 获取密码 32位 字母 + 数字
     * 第二标签页 . 第一组
     * */
    varStr2_1_1 = pCALOP->funStrOfProdRanNumPasswds(32,4);
    varStr2_1_2 = pCALOP->funStrOfProdRanNumPasswds(32,4);
    varStr2_1_3 = pCALOP->funStrOfProdRanNumPasswds(32,4);
    varStr2_1_4 = pCALOP->funStrOfProdRanNumPasswds(32,4);
    ui->labOfDisPasswd2_1_1->setText(QString::fromStdString(varStr2_1_1));
    ui->labOfDisPasswd2_1_2->setText(QString::fromStdString(varStr2_1_2));
    ui->labOfDisPasswd2_1_3->setText(QString::fromStdString(varStr2_1_3));
    ui->labOfDisPasswd2_1_4->setText(QString::fromStdString(varStr2_1_4));

    /*
     * 获取密码 64位 字母 + 数字 + 部分标点符号
     * 第二标签页 . 第二组
     * */
    varStr2_2_1 = pCALOP->funStrOfProdRanNumPasswds(64,2);
    varStr2_2_2 = pCALOP->funStrOfProdRanNumPasswds(64,2);
    ui->labOfDisPasswd2_2_1->setText(QString::fromStdString(varStr2_2_1));
    ui->labOfDisPasswd2_2_2->setText(QString::fromStdString(varStr2_2_2));

    /*
     * 获取密码 64位 字符 + 数字 + 全部标点符号
     * 第二标签页 . 第三组
     * */
    varStr2_3_1 = pCALOP->funStrOfProdRanNumPasswds(64,3);
    varStr2_3_2 = pCALOP->funStrOfProdRanNumPasswds(64,3);
    ui->labOfDisPasswd2_3_1->setText(QString::fromStdString(varStr2_3_1));
    ui->labOfDisPasswd2_3_2->setText(QString::fromStdString(varStr2_3_2));

    /*
     * 获取密码 32位十六进制
     * 第二标签页 . 第四组
     * */
    varStr2_4_1 = pCALOP->funStrOfProdRanNumPasswds(32,5);
    varStr2_4_2 = pCALOP->funStrOfProdRanNumPasswds(32,5);
    varStr2_4_3 = pCALOP->funStrOfProdRanNumPasswds(32,5);
    varStr2_4_4 = pCALOP->funStrOfProdRanNumPasswds(32,5);
    ui->labOfDisPasswd2_4_1->setText(QString::fromStdString(varStr2_4_1));
    ui->labOfDisPasswd2_4_2->setText(QString::fromStdString(varStr2_4_2));
    ui->labOfDisPasswd2_4_3->setText(QString::fromStdString(varStr2_4_3));
    ui->labOfDisPasswd2_4_4->setText(QString::fromStdString(varStr2_4_4));

    /*
     * 获取密码 64位十六进制
     * 第二标签页 . 第五组
     * */
    varStr2_5_1 = pCALOP->funStrOfProdRanNumPasswds(64,5);
    varStr2_5_2 = pCALOP->funStrOfProdRanNumPasswds(64,5);
    ui->labOfDisPasswd2_5_1->setText(QString::fromStdString(varStr2_5_1));
    ui->labOfDisPasswd2_5_2->setText(QString::fromStdString(varStr2_5_2));

    delete pCALOP;
}

// 第三标签页密码生产模块
void DerForPasswdProdPanel::funVoidOfDisPasswdThird(const int &a) const
{
    std::string varStrTemp_1 = "";

    if(a<10 || a>2048){
        return;
    }

    /*
     * 密码生产对象
     * */
    CreateALotOfPasswords* pCALOP = new CreateALotOfPasswords;

    if(ui->chBoxOfSelectedHex3_0_1->isChecked()){
        varStrTemp_1 = pCALOP->funStrOfProdRanNumPasswds(a,5);
        ui->plTexEdOfDisPasswd3_0_1->setPlainText(QString::fromStdString(varStrTemp_1));
    }else if(ui->groBOfDisPasswd3_0_1->isChecked()){
        if(ui->rButOfDisComPun3_1_1->isChecked()){
            varStrTemp_1 = pCALOP->funStrOfProdRanNumPasswds(a,1);
            ui->plTexEdOfDisPasswd3_0_1->setPlainText(QString::fromStdString(varStrTemp_1));
        }else if(ui->rButOfDisSmallPun3_1_2->isChecked()){
            varStrTemp_1 = pCALOP->funStrOfProdRanNumPasswds(a,2);
            ui->plTexEdOfDisPasswd3_0_1->setPlainText(QString::fromStdString(varStrTemp_1));
        }else if(ui->rButOfDisAllPun3_1_3->isChecked()){
            varStrTemp_1 = pCALOP->funStrOfProdRanNumPasswds(a,3);
            ui->plTexEdOfDisPasswd3_0_1->setPlainText(QString::fromStdString(varStrTemp_1));
        }
    }else if(!ui->groBOfDisPasswd3_0_1->isChecked()){
        varStrTemp_1 = pCALOP->funStrOfProdRanNumPasswds(a,4);
        ui->plTexEdOfDisPasswd3_0_1->setPlainText(QString::fromStdString(varStrTemp_1));
    }

    delete pCALOP;
}

// 复制到系统剪贴板
void DerForPasswdProdPanel::funVoidOfclipboard(const QString &str, const int &mod) const
{
    QClipboard* pClipboardIn = QApplication::clipboard();

    if(mod == 1){

        pClipboardIn->setText(str);
    }else if (mod == 2){
        pClipboardIn->clear();
    }
}

// 控件初始化函数
void DerForPasswdProdPanel::funVoidControlInitialize(DerForPasswdProdPanel *p) const
{
    /*
     * 设置标签的位置
     * */
    ui->tabWidOfDisPasswd1->setGeometry(0,3,800,900);

    /*
     * 设置 LCD 数字显示
     * */
    ui->lcdNumber1_1->setDigitCount(2);
    ui->lcdNumber1_1->setGeometry(300,51,64,23);
    ui->lcdNumber1_1->setSegmentStyle(QLCDNumber::Flat);
    ui->lcdNumber1_1->setVisible(false);
    ui->label1_1->setGeometry(350,51,200,23);
    ui->label1_1->setVisible(false);

    /*
     * 第一标签页 . 刷新密码 按钮
     * */
    ui->pusButOfRsetPasswd1_0_1->setGeometry(10,10,121,31);

    /*
     * 第一标签页 . 字符串展示
     * */
    ChMSTextCodec objTextCode;
    QByteArray varQBytArrLabOfComPun1_1_1 = "常用符号：! # $ % & + , . @ _";
    QByteArray varQBytArrLabOfSmallPun1_1_2 = "部分符号：! # $ % & + , . @ _ - = ^ ` ; ( ) [ ] { } ~";
    QByteArray varQBytArrLabOfAllPun1_1_3 = "全部符号：! # $ % & + , . @ _ - = ^ ` ; ( ) [ ] { } ~ ' \" * | : ? < >";

    ui->labOfComPun1_1_1->setGeometry(20,50,770,20);
    ui->labOfComPun1_1_1->setText(objTextCode.funQStrTextCodec(varQBytArrLabOfComPun1_1_1));
    ui->labOfComPun1_1_1->installEventFilter(p);
    ui->labOfSmallPun1_1_2->setGeometry(20,80,770,20);
    ui->labOfSmallPun1_1_2->setText(objTextCode.funQStrTextCodec(varQBytArrLabOfSmallPun1_1_2));
    ui->labOfSmallPun1_1_2->installEventFilter(p);
    ui->labOfAllPun1_1_3->setGeometry(20,110,770,20);
    ui->labOfAllPun1_1_3->setText(objTextCode.funQStrTextCodec(varQBytArrLabOfAllPun1_1_3));
    ui->labOfAllPun1_1_3->installEventFilter(p);

    /*
     * 第一标签页 . 第一组
     * */
    ui->groBOfDisPasswd1_0_1->setGeometry(10,140,770,111);

    ui->labOfDisPasswd1_1_1->setGeometry(10,20,260,20);
    ui->labOfDisPasswd1_1_1->setMinimumSize(260,20);
    ui->labOfDisPasswd1_1_1->setAlignment(Qt::AlignCenter);
    ui->labOfDisPasswd1_1_1->installEventFilter(p);

    ui->labOfDisPasswd1_1_2->setGeometry(270,20,260,20);
    ui->labOfDisPasswd1_1_2->setMinimumSize(260,20);
    ui->labOfDisPasswd1_1_2->setAlignment(Qt::AlignCenter);
    ui->labOfDisPasswd1_1_2->installEventFilter(p);

    ui->labOfDisPasswd1_1_3->setGeometry(530,20,260,20);
    ui->labOfDisPasswd1_1_3->setMinimumSize(260,20);
    ui->labOfDisPasswd1_1_3->setAlignment(Qt::AlignCenter);
    ui->labOfDisPasswd1_1_3->installEventFilter(p);

    ui->labOfDisPasswd1_1_4->setGeometry(10,70,260,20);
    ui->labOfDisPasswd1_1_4->setMinimumSize(260,20);
    ui->labOfDisPasswd1_1_4->setAlignment(Qt::AlignCenter);
    ui->labOfDisPasswd1_1_4->installEventFilter(p);

    ui->labOfDisPasswd1_1_5->setGeometry(270,70,260,20);
    ui->labOfDisPasswd1_1_5->setMinimumSize(260,20);
    ui->labOfDisPasswd1_1_5->setAlignment(Qt::AlignCenter);
    ui->labOfDisPasswd1_1_5->installEventFilter(p);

    ui->labOfDisPasswd1_1_6->setGeometry(530,70,260,20);
    ui->labOfDisPasswd1_1_6->setMinimumSize(260,20);
    ui->labOfDisPasswd1_1_6->setAlignment(Qt::AlignCenter);
    ui->labOfDisPasswd1_1_6->installEventFilter(p);

    /*
     * 第一标签页 . 第二组
     * */
    ui->groBOfDisPasswd1_0_2->setGeometry(10,256,770,111);

    ui->labOfDisPasswd1_2_1->setGeometry(10,20,260,20);
    ui->labOfDisPasswd1_2_1->setMinimumSize(260,20);
    ui->labOfDisPasswd1_2_1->setAlignment(Qt::AlignCenter);
    ui->labOfDisPasswd1_2_1->installEventFilter(p);

    ui->labOfDisPasswd1_2_2->setGeometry(270,20,260,20);
    ui->labOfDisPasswd1_2_2->setMinimumSize(260,20);
    ui->labOfDisPasswd1_2_2->setAlignment(Qt::AlignCenter);
    ui->labOfDisPasswd1_2_2->installEventFilter(p);

    ui->labOfDisPasswd1_2_3->setGeometry(530,20,260,20);
    ui->labOfDisPasswd1_2_3->setMinimumSize(260,20);
    ui->labOfDisPasswd1_2_3->setAlignment(Qt::AlignCenter);
    ui->labOfDisPasswd1_2_3->installEventFilter(p);

    ui->labOfDisPasswd1_2_4->setGeometry(10,70,260,20);
    ui->labOfDisPasswd1_2_4->setMinimumSize(260,20);
    ui->labOfDisPasswd1_2_4->setAlignment(Qt::AlignCenter);
    ui->labOfDisPasswd1_2_4->installEventFilter(p);

    ui->labOfDisPasswd1_2_5->setGeometry(270,70,260,20);
    ui->labOfDisPasswd1_2_5->setMinimumSize(260,20);
    ui->labOfDisPasswd1_2_5->setAlignment(Qt::AlignCenter);
    ui->labOfDisPasswd1_2_5->installEventFilter(p);

    ui->labOfDisPasswd1_2_6->setGeometry(530,70,260,20);
    ui->labOfDisPasswd1_2_6->setMinimumSize(260,20);
    ui->labOfDisPasswd1_2_6->setAlignment(Qt::AlignCenter);
    ui->labOfDisPasswd1_2_6->installEventFilter(p);

    /*
     * 第一标签页 . 复制按钮 和 字符串编辑框
     * */
    ui->pusButOfCopyPasswd1_1_1->setGeometry(20,380,75,35);
    ui->linEdOfCopyPasswd2_1_1->setReadOnly(true);
    ui->linEdOfCopyPasswd1_1_1->setGeometry(130,380,651,35);

    /*
     * 第一标签页 . 第三组
     * */
    ui->groBOfDisPasswd1_0_3->setGeometry(10,430,770,111);

    ui->labOfDisPasswd1_3_1->setGeometry(10,20,260,20);
    ui->labOfDisPasswd1_3_1->setMinimumSize(260,20);
    ui->labOfDisPasswd1_3_1->setAlignment(Qt::AlignCenter);
    ui->labOfDisPasswd1_3_1->installEventFilter(p);

    ui->labOfDisPasswd1_3_2->setGeometry(270,20,260,20);
    ui->labOfDisPasswd1_3_2->setMinimumSize(260,20);
    ui->labOfDisPasswd1_3_2->setAlignment(Qt::AlignCenter);
    ui->labOfDisPasswd1_3_2->installEventFilter(p);

    ui->labOfDisPasswd1_3_3->setGeometry(530,20,260,20);
    ui->labOfDisPasswd1_3_3->setMinimumSize(260,20);
    ui->labOfDisPasswd1_3_3->setAlignment(Qt::AlignCenter);
    ui->labOfDisPasswd1_3_3->installEventFilter(p);

    ui->labOfDisPasswd1_3_4->setGeometry(10,70,260,20);
    ui->labOfDisPasswd1_3_4->setMinimumSize(260,20);
    ui->labOfDisPasswd1_3_4->setAlignment(Qt::AlignCenter);
    ui->labOfDisPasswd1_3_4->installEventFilter(p);

    ui->labOfDisPasswd1_3_5->setGeometry(270,70,260,20);
    ui->labOfDisPasswd1_3_5->setMinimumSize(260,20);
    ui->labOfDisPasswd1_3_5->setAlignment(Qt::AlignCenter);
    ui->labOfDisPasswd1_3_5->installEventFilter(p);

    ui->labOfDisPasswd1_3_6->setGeometry(530,70,260,20);
    ui->labOfDisPasswd1_3_6->setMinimumSize(260,20);
    ui->labOfDisPasswd1_3_6->setAlignment(Qt::AlignCenter);
    ui->labOfDisPasswd1_3_6->installEventFilter(p);

    /*
     * 第一标签页 . 第四组
     * */
    ui->groBOfDisPasswd1_0_4->setGeometry(10,550,770,111);

    ui->labOfDisPasswd1_4_1->setGeometry(10,20,375,20);
    ui->labOfDisPasswd1_4_1->setMinimumSize(375,20);
    ui->labOfDisPasswd1_4_1->setAlignment(Qt::AlignCenter);
    ui->labOfDisPasswd1_4_1->installEventFilter(p);

    ui->labOfDisPasswd1_4_2->setGeometry(390,20,375,20);
    ui->labOfDisPasswd1_4_2->setMinimumSize(375,20);
    ui->labOfDisPasswd1_4_2->setAlignment(Qt::AlignCenter);
    ui->labOfDisPasswd1_4_2->installEventFilter(p);

    ui->labOfDisPasswd1_4_3->setGeometry(10,70,375,20);
    ui->labOfDisPasswd1_4_3->setMinimumSize(375,20);
    ui->labOfDisPasswd1_4_3->setAlignment(Qt::AlignCenter);
    ui->labOfDisPasswd1_4_3->installEventFilter(p);

    ui->labOfDisPasswd1_4_4->setGeometry(390,70,375,20);
    ui->labOfDisPasswd1_4_4->setMinimumSize(375,20);
    ui->labOfDisPasswd1_4_4->setAlignment(Qt::AlignCenter);
    ui->labOfDisPasswd1_4_4->installEventFilter(p);


    /*
     * 第二标签页 . 刷新密码 按钮
     * */
    ui->pusButOfRsetPasswd2_0_1->setGeometry(10,10,121,31);

    /*
     * 第二标签页 . 第一组
     * */
    ui->groBOfDisPasswd2_0_1->setGeometry(10,50,770,111);

    ui->labOfDisPasswd2_1_1->setGeometry(10,30,375,20);
    ui->labOfDisPasswd2_1_1->setAlignment(Qt::AlignCenter);
    ui->labOfDisPasswd2_1_1->installEventFilter(p);
    ui->labOfDisPasswd2_1_2->setGeometry(390,30,375,20);
    ui->labOfDisPasswd2_1_2->setAlignment(Qt::AlignCenter);
    ui->labOfDisPasswd2_1_2->installEventFilter(p);
    ui->labOfDisPasswd2_1_3->setGeometry(10,70,375,20);
    ui->labOfDisPasswd2_1_3->setAlignment(Qt::AlignCenter);
    ui->labOfDisPasswd2_1_3->installEventFilter(p);
    ui->labOfDisPasswd2_1_4->setGeometry(390,70,375,20);
    ui->labOfDisPasswd2_1_4->setAlignment(Qt::AlignCenter);
    ui->labOfDisPasswd2_1_4->installEventFilter(p);

    /*
     * 第二标签页 . 第二组
     * */
    ui->groBOfDisPasswd2_0_2->setGeometry(10,190,770,111);

    ui->labOfDisPasswd2_2_1->setGeometry(10,25,750,20);
    ui->labOfDisPasswd2_2_1->setAlignment(Qt::AlignCenter);
    ui->labOfDisPasswd2_2_1->installEventFilter(p);
    ui->labOfDisPasswd2_2_2->setGeometry(10,66,750,20);
    ui->labOfDisPasswd2_2_2->setAlignment(Qt::AlignCenter);
    ui->labOfDisPasswd2_2_2->installEventFilter(p);

    /*
     * 第二标签页 . 复制 编辑框 控件
     * */
    ui->pusButOfCopyPasswd2_1_1->setGeometry(10,330,75,35);
    ui->linEdOfCopyPasswd2_1_1->setReadOnly(true);
    ui->linEdOfCopyPasswd2_1_1->setGeometry(130,330,651,35);

    /*
     * 第二标签页 . 第三组
     * */
    ui->groBOfDisPasswd2_0_3->setGeometry(10,390,770,111);

    ui->labOfDisPasswd2_3_1->setGeometry(10,25,750,35);
    ui->labOfDisPasswd2_3_1->setAlignment(Qt::AlignCenter);
    ui->labOfDisPasswd2_3_1->installEventFilter(p);
    ui->labOfDisPasswd2_3_2->setGeometry(10,66,750,35);
    ui->labOfDisPasswd2_3_2->setAlignment(Qt::AlignCenter);
    ui->labOfDisPasswd2_3_2->installEventFilter(p);

    /*
     * 第二标签页 . 第四组
     * */
    ui->groBOfDisPasswd2_0_4->setGeometry(10,530,770,111);

    ui->labOfDisPasswd2_4_1->setGeometry(10,30,375,20);
    ui->labOfDisPasswd2_4_1->setAlignment(Qt::AlignCenter);
    ui->labOfDisPasswd2_4_1->installEventFilter(p);
    ui->labOfDisPasswd2_4_2->setGeometry(390,30,375,20);
    ui->labOfDisPasswd2_4_2->setAlignment(Qt::AlignCenter);
    ui->labOfDisPasswd2_4_2->installEventFilter(p);
    ui->labOfDisPasswd2_4_3->setGeometry(10,70,375,20);
    ui->labOfDisPasswd2_4_3->setAlignment(Qt::AlignCenter);
    ui->labOfDisPasswd2_4_3->installEventFilter(p);
    ui->labOfDisPasswd2_4_4->setGeometry(390,70,375,20);
    ui->labOfDisPasswd2_4_4->setAlignment(Qt::AlignCenter);
    ui->labOfDisPasswd2_4_4->installEventFilter(p);

    /*
     * 第二标签页 . 第五组
     * */
    ui->groBOfDisPasswd2_0_5->setGeometry(10,670,770,111);

    ui->labOfDisPasswd2_5_1->setGeometry(10,25,750,35);
    ui->labOfDisPasswd2_5_1->setAlignment(Qt::AlignCenter);
    ui->labOfDisPasswd2_5_1->installEventFilter(p);
    ui->labOfDisPasswd2_5_2->setGeometry(10,66,750,35);
    ui->labOfDisPasswd2_5_2->setAlignment(Qt::AlignCenter);
    ui->labOfDisPasswd2_5_2->installEventFilter(p);

    /*
     * 第三标签 生产密码 按钮
     * */
    ui->pusButOfCreatePasswd3_0_1->setGeometry(10,10,121,31);

    /*
     * 第三标签页 长度标签
     * */
    ui->label3_1->setGeometry(140,10,53,31);

    /*
     * 第三标签页 密码长度设置
     * */
    ui->linEdOfPasswdLenSet3_0_1->setGeometry(186,10,50,31);
    ui->linEdOfPasswdLenSet3_0_1->setAlignment(Qt::AlignCenter);
    ui->linEdOfPasswdLenSet3_0_1->setValidator(new QRegExpValidator(QRegExp("[0-9]+$")));
    ui->linEdOfPasswdLenSet3_0_1->setText("64");

    /*
     * 第三标签页 字符串 密码编辑框
     * */
    ui->plTexEdOfDisPasswd3_0_1->setGeometry(10,100,770,281);

    /*
     * 第三标签页 字母 数字 十六进制 选择框 和 标签的初始化
     * */
    ui->chBoxOfSelectedLet3_0_1->setGeometry(20,420,80,35);
    ui->chBoxOfSelectedLet3_0_1->setChecked(true);
    ui->chBoxOfSelectedLet3_0_1->setEnabled(false);
    ui->chBoxOfSelectedNum3_0_1->setGeometry(20,490,80,35);
    ui->chBoxOfSelectedNum3_0_1->setChecked(true);
    ui->chBoxOfSelectedNum3_0_1->setEnabled(false);
    ui->chBoxOfSelectedHex3_0_1->setGeometry(20,540,120,35);
    ui->labOfDisUppAlb3_0_1->setGeometry(110,400,661,31);
    ui->labOfDisLowerAlb3_0_2->setGeometry(110,440,661,31);
    ui->labOfDisNum3_0_3->setGeometry(110,490,661,35);

    /*
     * 第三标签页 特殊字符选择框初始化
     * */
    ui->groBOfDisPasswd3_0_1->setGeometry(10,590,770,211);
    ui->rButOfDisComPun3_1_1->setGeometry(20,30,95,35);
    ui->rButOfDisSmallPun3_1_2->setGeometry(20,90,95,35);
    ui->rButOfDisAllPun3_1_3->setGeometry(20,150,95,35);

    ui->labOfDisComPun3_1_1->setGeometry(129,30,621,35);
    ui->labOfDisSmallPun3_1_2->setGeometry(129,90,621,35);
    ui->labOfDisAllPun3_1_3->setGeometry(129,150,621,35);


}

// 点击标签获得标签文本内容至编辑框和剪贴板
bool DerForPasswdProdPanel::eventFilter(QObject *obj, QEvent *event)
{
    QString varStr = "";
    ChMSTextCodec objTextCode;

    if(obj == ui->labOfComPun1_1_1){
        if(event->type() == QEvent::MouseButtonRelease){
            if(objTimDJS->isActive())
            {
                objTimDJS->stop();
                DerForPasswdProdPanel::funVoidOfclipboard("",2);
                ui->lcdNumber1_1->setVisible(false);
                ui->label1_1->setVisible(false);
            }
            QByteArray varQBytArrLabOfComPun1_1_1 = "!#$%&+,.@_";
            ui->linEdOfCopyPasswd1_1_1->setText(objTextCode.funQStrTextCodec(varQBytArrLabOfComPun1_1_1));
            ui->linEdOfCopyPasswd2_1_1->setText(objTextCode.funQStrTextCodec(varQBytArrLabOfComPun1_1_1));
            return true;
        }else{
            return false;
        }
    }else if(obj == ui->labOfSmallPun1_1_2){
        if(event->type() == QEvent::MouseButtonRelease){
            if(objTimDJS->isActive())
            {
                objTimDJS->stop();
                DerForPasswdProdPanel::funVoidOfclipboard("",2);
                ui->lcdNumber1_1->setVisible(false);
                ui->label1_1->setVisible(false);
            }
            QByteArray varQBytArrLabOfSmallPun1_1_2 = "!#$%&+,.@_-=^`;()[]{}~";
            ui->linEdOfCopyPasswd1_1_1->setText(objTextCode.funQStrTextCodec(varQBytArrLabOfSmallPun1_1_2));
            ui->linEdOfCopyPasswd2_1_1->setText(objTextCode.funQStrTextCodec(varQBytArrLabOfSmallPun1_1_2));
            return true;
        }else{
            return false;
        }
    }else if(obj == ui->labOfAllPun1_1_3){
        if(event->type() == QEvent::MouseButtonRelease){
            if(objTimDJS->isActive())
            {
                objTimDJS->stop();
                DerForPasswdProdPanel::funVoidOfclipboard("",2);
                ui->lcdNumber1_1->setVisible(false);
                ui->label1_1->setVisible(false);
            }
            QByteArray varQBytArrLabOfAllPun1_1_3 = "!#$%&+,.@_-=^'`;()[]{}~\"*|:?<>";
            ui->linEdOfCopyPasswd1_1_1->setText(objTextCode.funQStrTextCodec(varQBytArrLabOfAllPun1_1_3));
            ui->linEdOfCopyPasswd2_1_1->setText(objTextCode.funQStrTextCodec(varQBytArrLabOfAllPun1_1_3));
            return true;
        }else{
            return false;
        }
    }else if(obj == ui->labOfDisPasswd1_1_1){
        if(event->type() == QEvent::MouseButtonRelease){
            // 进入字符串编辑器
            varStr = ui->labOfDisPasswd1_1_1->text();
            ui->linEdOfCopyPasswd1_1_1->setText(varStr);
            ui->linEdOfCopyPasswd1_1_1->setReadOnly(false);
            ui->linEdOfCopyPasswd2_1_1->setText(varStr);
            ui->linEdOfCopyPasswd2_1_1->setReadOnly(false);
            // 复制到剪贴板
            this->funVoidOfclipboard(varStr);
            // 显示倒计时
            ui->lcdNumber1_1->setVisible(true);
            ui->label1_1->setVisible(true);
            objTimDJS->start();
            varIntHearbeat = 10;
            varFrontDelay = 2;
            varBackDelay = 3;
            ui->lcdNumber1_1->display(varIntHearbeat);
            return true;
        }else{
            return false;
        }
    }else if(obj == ui->labOfDisPasswd1_1_2){
        if(event->type() == QEvent::MouseButtonRelease){
            varStr = ui->labOfDisPasswd1_1_2->text();
            ui->linEdOfCopyPasswd1_1_1->setText(varStr);
            ui->linEdOfCopyPasswd1_1_1->setReadOnly(false);
            ui->linEdOfCopyPasswd2_1_1->setText(varStr);
            ui->linEdOfCopyPasswd2_1_1->setReadOnly(false);
            // 复制到剪贴板
            this->funVoidOfclipboard(varStr);
            // 显示倒计时
            ui->lcdNumber1_1->setVisible(true);
            ui->label1_1->setVisible(true);
            objTimDJS->start();
            varIntHearbeat = 10;
            varFrontDelay = 2;
            varBackDelay = 3;
            ui->lcdNumber1_1->display(varIntHearbeat);
            return true;
        }else{
            return false;
        }
    }else if(obj == ui->labOfDisPasswd1_1_3){
        if(event->type() == QEvent::MouseButtonRelease){
            varStr = ui->labOfDisPasswd1_1_3->text();
            ui->linEdOfCopyPasswd1_1_1->setText(varStr);
            ui->linEdOfCopyPasswd1_1_1->setReadOnly(false);
            ui->linEdOfCopyPasswd2_1_1->setText(varStr);
            ui->linEdOfCopyPasswd2_1_1->setReadOnly(false);
            // 复制到剪贴板
            this->funVoidOfclipboard(varStr);
            // 显示倒计时
            ui->lcdNumber1_1->setVisible(true);
            ui->label1_1->setVisible(true);
            objTimDJS->start();
            varIntHearbeat = 10;
            varFrontDelay = 2;
            varBackDelay = 3;
            ui->lcdNumber1_1->display(varIntHearbeat);
            return true;
        }else{
            return false;
        }
    }else if(obj == ui->labOfDisPasswd1_1_4){
        if(event->type() == QEvent::MouseButtonRelease){
            varStr = ui->labOfDisPasswd1_1_4->text();
            ui->linEdOfCopyPasswd1_1_1->setText(varStr);
            ui->linEdOfCopyPasswd1_1_1->setReadOnly(false);
            ui->linEdOfCopyPasswd2_1_1->setText(varStr);
            ui->linEdOfCopyPasswd2_1_1->setReadOnly(false);
            // 复制到剪贴板
            this->funVoidOfclipboard(varStr);
            // 显示倒计时
            ui->lcdNumber1_1->setVisible(true);
            ui->label1_1->setVisible(true);
            objTimDJS->start();
            varIntHearbeat = 10;
            varFrontDelay = 2;
            varBackDelay = 3;
            ui->lcdNumber1_1->display(varIntHearbeat);
            return true;
        }else{
            return false;
        }
    }else if(obj == ui->labOfDisPasswd1_1_5){
        if(event->type() == QEvent::MouseButtonRelease){
            varStr = ui->labOfDisPasswd1_1_5->text();
            ui->linEdOfCopyPasswd1_1_1->setText(varStr);
            ui->linEdOfCopyPasswd1_1_1->setReadOnly(false);
            ui->linEdOfCopyPasswd2_1_1->setText(varStr);
            ui->linEdOfCopyPasswd2_1_1->setReadOnly(false);
            // 复制到剪贴板
            this->funVoidOfclipboard(varStr);
            // 显示倒计时
            ui->lcdNumber1_1->setVisible(true);
            ui->label1_1->setVisible(true);
            objTimDJS->start();
            varIntHearbeat = 10;
            varFrontDelay = 2;
            varBackDelay = 3;
            ui->lcdNumber1_1->display(varIntHearbeat);
            return true;
        }else{
            return false;
        }
    }else if(obj == ui->labOfDisPasswd1_1_6){
        if(event->type() == QEvent::MouseButtonRelease){
            varStr = ui->labOfDisPasswd1_1_6->text();
            ui->linEdOfCopyPasswd1_1_1->setText(varStr);
            ui->linEdOfCopyPasswd1_1_1->setReadOnly(false);
            ui->linEdOfCopyPasswd2_1_1->setText(varStr);
            ui->linEdOfCopyPasswd2_1_1->setReadOnly(false);
            // 复制到剪贴板
            this->funVoidOfclipboard(varStr);
            // 显示倒计时
            ui->lcdNumber1_1->setVisible(true);
            ui->label1_1->setVisible(true);
            objTimDJS->start();
            varIntHearbeat = 10;
            varFrontDelay = 2;
            varBackDelay = 3;
            ui->lcdNumber1_1->display(varIntHearbeat);
            return true;
        }else{
            return false;
        }
    }else if(obj == ui->labOfDisPasswd1_2_1){
        if(event->type() == QEvent::MouseButtonRelease){
            varStr = ui->labOfDisPasswd1_2_1->text();
            ui->linEdOfCopyPasswd1_1_1->setText(varStr);
            ui->linEdOfCopyPasswd1_1_1->setReadOnly(false);
            ui->linEdOfCopyPasswd2_1_1->setText(varStr);
            ui->linEdOfCopyPasswd2_1_1->setReadOnly(false);
            // 复制到剪贴板
            this->funVoidOfclipboard(varStr);
            // 显示倒计时
            ui->lcdNumber1_1->setVisible(true);
            ui->label1_1->setVisible(true);
            objTimDJS->start();
            varIntHearbeat = 10;
            varFrontDelay = 2;
            varBackDelay = 3;
            ui->lcdNumber1_1->display(varIntHearbeat);
            return true;
        }else{
            return false;
        }
    }else if(obj == ui->labOfDisPasswd1_2_2){
        if(event->type() == QEvent::MouseButtonRelease){
            varStr = ui->labOfDisPasswd1_2_2->text();
            ui->linEdOfCopyPasswd1_1_1->setText(varStr);
            ui->linEdOfCopyPasswd1_1_1->setReadOnly(false);
            ui->linEdOfCopyPasswd2_1_1->setText(varStr);
            ui->linEdOfCopyPasswd2_1_1->setReadOnly(false);
            // 复制到剪贴板
            this->funVoidOfclipboard(varStr);
            // 显示倒计时
            ui->lcdNumber1_1->setVisible(true);
            ui->label1_1->setVisible(true);
            objTimDJS->start();
            varIntHearbeat = 10;
            varFrontDelay = 2;
            varBackDelay = 3;
            ui->lcdNumber1_1->display(varIntHearbeat);
            return true;
        }else{
            return false;
        }
    }else if(obj == ui->labOfDisPasswd1_2_3){
        if(event->type() == QEvent::MouseButtonRelease){
            varStr = ui->labOfDisPasswd1_2_3->text();
            ui->linEdOfCopyPasswd1_1_1->setText(varStr);
            ui->linEdOfCopyPasswd1_1_1->setReadOnly(false);
            ui->linEdOfCopyPasswd2_1_1->setText(varStr);
            ui->linEdOfCopyPasswd2_1_1->setReadOnly(false);
            // 复制到剪贴板
            this->funVoidOfclipboard(varStr);
            // 显示倒计时
            ui->lcdNumber1_1->setVisible(true);
            ui->label1_1->setVisible(true);
            objTimDJS->start();
            varIntHearbeat = 10;
            varFrontDelay = 2;
            varBackDelay = 3;
            ui->lcdNumber1_1->display(varIntHearbeat);
            return true;
        }else{
            return false;
        }
    }else if(obj == ui->labOfDisPasswd1_2_4){
        if(event->type() == QEvent::MouseButtonRelease){
            varStr = ui->labOfDisPasswd1_2_4->text();
            ui->linEdOfCopyPasswd1_1_1->setText(varStr);
            ui->linEdOfCopyPasswd1_1_1->setReadOnly(false);
            ui->linEdOfCopyPasswd2_1_1->setText(varStr);
            ui->linEdOfCopyPasswd2_1_1->setReadOnly(false);
            // 复制到剪贴板
            this->funVoidOfclipboard(varStr);
            // 显示倒计时
            ui->lcdNumber1_1->setVisible(true);
            ui->label1_1->setVisible(true);
            objTimDJS->start();
            varIntHearbeat = 10;
            varFrontDelay = 2;
            varBackDelay = 3;
            ui->lcdNumber1_1->display(varIntHearbeat);
            return true;
        }else{
            return false;
        }
    }else if(obj == ui->labOfDisPasswd1_2_5){
        if(event->type() == QEvent::MouseButtonRelease){
            varStr = ui->labOfDisPasswd1_2_5->text();
            ui->linEdOfCopyPasswd1_1_1->setText(varStr);
            ui->linEdOfCopyPasswd1_1_1->setReadOnly(false);
            ui->linEdOfCopyPasswd2_1_1->setText(varStr);
            ui->linEdOfCopyPasswd2_1_1->setReadOnly(false);
            // 复制到剪贴板
            this->funVoidOfclipboard(varStr);
            // 显示倒计时
            ui->lcdNumber1_1->setVisible(true);
            ui->label1_1->setVisible(true);
            objTimDJS->start();
            varIntHearbeat = 10;
            varFrontDelay = 2;
            varBackDelay = 3;
            ui->lcdNumber1_1->display(varIntHearbeat);
            return true;
        }else{
            return false;
        }
    }else if(obj == ui->labOfDisPasswd1_2_6){
        if(event->type() == QEvent::MouseButtonRelease){
            varStr = ui->labOfDisPasswd1_2_6->text();
            ui->linEdOfCopyPasswd1_1_1->setText(varStr);
            ui->linEdOfCopyPasswd1_1_1->setReadOnly(false);
            ui->linEdOfCopyPasswd2_1_1->setText(varStr);
            ui->linEdOfCopyPasswd2_1_1->setReadOnly(false);
            // 复制到剪贴板
            this->funVoidOfclipboard(varStr);
            // 显示倒计时
            ui->lcdNumber1_1->setVisible(true);
            ui->label1_1->setVisible(true);
            objTimDJS->start();
            varIntHearbeat = 10;
            varFrontDelay = 2;
            varBackDelay = 3;
            ui->lcdNumber1_1->display(varIntHearbeat);
            return true;
        }else{
            return false;
        }
    }else if(obj == ui->labOfDisPasswd1_3_1){
        if(event->type() == QEvent::MouseButtonRelease){
            varStr = ui->labOfDisPasswd1_3_1->text();
            ui->linEdOfCopyPasswd1_1_1->setText(varStr);
            ui->linEdOfCopyPasswd1_1_1->setReadOnly(false);
            ui->linEdOfCopyPasswd2_1_1->setText(varStr);
            ui->linEdOfCopyPasswd2_1_1->setReadOnly(false);
            // 复制到剪贴板
            this->funVoidOfclipboard(varStr);
            // 显示倒计时
            ui->lcdNumber1_1->setVisible(true);
            ui->label1_1->setVisible(true);
            objTimDJS->start();
            varIntHearbeat = 10;
            varFrontDelay = 2;
            varBackDelay = 3;
            ui->lcdNumber1_1->display(varIntHearbeat);
            return true;
        }else{
            return false;
        }
    }else if(obj == ui->labOfDisPasswd1_3_2){
        if(event->type() == QEvent::MouseButtonRelease){
            varStr = ui->labOfDisPasswd1_3_2->text();
            ui->linEdOfCopyPasswd1_1_1->setText(varStr);
            ui->linEdOfCopyPasswd1_1_1->setReadOnly(false);
            ui->linEdOfCopyPasswd2_1_1->setText(varStr);
            ui->linEdOfCopyPasswd2_1_1->setReadOnly(false);
            // 复制到剪贴板
            this->funVoidOfclipboard(varStr);
            // 显示倒计时
            ui->lcdNumber1_1->setVisible(true);
            ui->label1_1->setVisible(true);
            objTimDJS->start();
            varIntHearbeat = 10;
            varFrontDelay = 2;
            varBackDelay = 3;
            ui->lcdNumber1_1->display(varIntHearbeat);
            return true;
        }else{
            return false;
        }
    }else if(obj == ui->labOfDisPasswd1_3_3){
        if(event->type() == QEvent::MouseButtonRelease){
            varStr = ui->labOfDisPasswd1_3_3->text();
            ui->linEdOfCopyPasswd1_1_1->setText(varStr);
            ui->linEdOfCopyPasswd1_1_1->setReadOnly(false);
            ui->linEdOfCopyPasswd2_1_1->setText(varStr);
            ui->linEdOfCopyPasswd2_1_1->setReadOnly(false);
            // 复制到剪贴板
            this->funVoidOfclipboard(varStr);
            // 显示倒计时
            ui->lcdNumber1_1->setVisible(true);
            ui->label1_1->setVisible(true);
            objTimDJS->start();
            varIntHearbeat = 10;
            varFrontDelay = 2;
            varBackDelay = 3;
            ui->lcdNumber1_1->display(varIntHearbeat);
            return true;
        }else{
            return false;
        }
    }else if(obj == ui->labOfDisPasswd1_3_4){
        if(event->type() == QEvent::MouseButtonRelease){
            varStr = ui->labOfDisPasswd1_3_4->text();
            ui->linEdOfCopyPasswd1_1_1->setText(varStr);
            ui->linEdOfCopyPasswd1_1_1->setReadOnly(false);
            ui->linEdOfCopyPasswd2_1_1->setText(varStr);
            ui->linEdOfCopyPasswd2_1_1->setReadOnly(false);
            // 复制到剪贴板
            this->funVoidOfclipboard(varStr);
            // 显示倒计时
            ui->lcdNumber1_1->setVisible(true);
            ui->label1_1->setVisible(true);
            objTimDJS->start();
            varIntHearbeat = 10;
            varFrontDelay = 2;
            varBackDelay = 3;
            ui->lcdNumber1_1->display(varIntHearbeat);
            return true;
        }else{
            return false;
        }
    }else if(obj == ui->labOfDisPasswd1_3_5){
        if(event->type() == QEvent::MouseButtonRelease){
            varStr = ui->labOfDisPasswd1_3_5->text();
            ui->linEdOfCopyPasswd1_1_1->setText(varStr);
            ui->linEdOfCopyPasswd1_1_1->setReadOnly(false);
            ui->linEdOfCopyPasswd2_1_1->setText(varStr);
            ui->linEdOfCopyPasswd2_1_1->setReadOnly(false);
            // 复制到剪贴板
            this->funVoidOfclipboard(varStr);
            // 显示倒计时
            ui->lcdNumber1_1->setVisible(true);
            ui->label1_1->setVisible(true);
            objTimDJS->start();
            varIntHearbeat = 10;
            varFrontDelay = 2;
            varBackDelay = 3;
            ui->lcdNumber1_1->display(varIntHearbeat);
            return true;
        }else{
            return false;
        }
    }else if(obj == ui->labOfDisPasswd1_3_6){
        if(event->type() == QEvent::MouseButtonRelease){
            varStr = ui->labOfDisPasswd1_3_6->text();
            ui->linEdOfCopyPasswd1_1_1->setText(varStr);
            ui->linEdOfCopyPasswd1_1_1->setReadOnly(false);
            ui->linEdOfCopyPasswd2_1_1->setText(varStr);
            ui->linEdOfCopyPasswd2_1_1->setReadOnly(false);
            // 复制到剪贴板
            this->funVoidOfclipboard(varStr);
            // 显示倒计时
            ui->lcdNumber1_1->setVisible(true);
            ui->label1_1->setVisible(true);
            objTimDJS->start();
            varIntHearbeat = 10;
            varFrontDelay = 2;
            varBackDelay = 3;
            ui->lcdNumber1_1->display(varIntHearbeat);
            return true;
        }else{
            return false;
        }
    }else if(obj == ui->labOfDisPasswd1_4_1){
        if(event->type() == QEvent::MouseButtonRelease){
            varStr = ui->labOfDisPasswd1_4_1->text();
            ui->linEdOfCopyPasswd1_1_1->setText(varStr);
            ui->linEdOfCopyPasswd1_1_1->setReadOnly(false);
            ui->linEdOfCopyPasswd2_1_1->setText(varStr);
            ui->linEdOfCopyPasswd2_1_1->setReadOnly(false);
            // 复制到剪贴板
            this->funVoidOfclipboard(varStr);
            // 显示倒计时
            ui->lcdNumber1_1->setVisible(true);
            ui->label1_1->setVisible(true);
            objTimDJS->start();
            varIntHearbeat = 10;
            varFrontDelay = 2;
            varBackDelay = 3;
            ui->lcdNumber1_1->display(varIntHearbeat);
            return true;
        }else{
            return false;
        }
    }else if(obj == ui->labOfDisPasswd1_4_2){
        if(event->type() == QEvent::MouseButtonRelease){
            varStr = ui->labOfDisPasswd1_4_2->text();
            ui->linEdOfCopyPasswd1_1_1->setText(varStr);
            ui->linEdOfCopyPasswd1_1_1->setReadOnly(false);
            ui->linEdOfCopyPasswd2_1_1->setText(varStr);
            ui->linEdOfCopyPasswd2_1_1->setReadOnly(false);
            // 复制到剪贴板
            this->funVoidOfclipboard(varStr);
            // 显示倒计时
            ui->lcdNumber1_1->setVisible(true);
            ui->label1_1->setVisible(true);
            objTimDJS->start();
            varIntHearbeat = 10;
            varFrontDelay = 2;
            varBackDelay = 3;
            ui->lcdNumber1_1->display(varIntHearbeat);
            return true;
        }else{
            return false;
        }
    }else if(obj == ui->labOfDisPasswd1_4_3){
        if(event->type() == QEvent::MouseButtonRelease){
            varStr = ui->labOfDisPasswd1_4_3->text();
            ui->linEdOfCopyPasswd1_1_1->setText(varStr);
            ui->linEdOfCopyPasswd1_1_1->setReadOnly(false);
            ui->linEdOfCopyPasswd2_1_1->setText(varStr);
            ui->linEdOfCopyPasswd2_1_1->setReadOnly(false);
            // 复制到剪贴板
            this->funVoidOfclipboard(varStr);
            // 显示倒计时
            ui->lcdNumber1_1->setVisible(true);
            ui->label1_1->setVisible(true);
            objTimDJS->start();
            varIntHearbeat = 10;
            varFrontDelay = 2;
            varBackDelay = 3;
            ui->lcdNumber1_1->display(varIntHearbeat);
            return true;
        }else{
            return false;
        }
    }else if(obj == ui->labOfDisPasswd1_4_4){
        if(event->type() == QEvent::MouseButtonRelease){
            varStr = ui->labOfDisPasswd1_4_4->text();
            ui->linEdOfCopyPasswd1_1_1->setText(varStr);
            ui->linEdOfCopyPasswd1_1_1->setReadOnly(false);
            ui->linEdOfCopyPasswd2_1_1->setText(varStr);
            ui->linEdOfCopyPasswd2_1_1->setReadOnly(false);
            // 复制到剪贴板
            this->funVoidOfclipboard(varStr);
            // 显示倒计时
            ui->lcdNumber1_1->setVisible(true);
            ui->label1_1->setVisible(true);
            objTimDJS->start();
            varIntHearbeat = 10;
            varFrontDelay = 2;
            varBackDelay = 3;
            ui->lcdNumber1_1->display(varIntHearbeat);
            return true;
        }else{
            return false;
        }



// ***********************************************




    }else if(obj == ui->labOfDisPasswd2_1_1){
        if(event->type() == QEvent::MouseButtonRelease){
            varStr = ui->labOfDisPasswd2_1_1->text();
            ui->linEdOfCopyPasswd2_1_1->setText(varStr);
            ui->linEdOfCopyPasswd2_1_1->setReadOnly(false);
            ui->linEdOfCopyPasswd1_1_1->setText(varStr);
            ui->linEdOfCopyPasswd1_1_1->setReadOnly(false);
            // 复制到剪贴板
            this->funVoidOfclipboard(varStr);
            // 显示倒计时
            ui->lcdNumber1_1->setVisible(true);
            ui->label1_1->setVisible(true);
            objTimDJS->start();
            varIntHearbeat = 10;
            varFrontDelay = 2;
            varBackDelay = 3;
            ui->lcdNumber1_1->display(varIntHearbeat);
            return true;
        }else{
            return false;
        }
    }else if(obj == ui->labOfDisPasswd2_1_2){
        if(event->type() == QEvent::MouseButtonRelease){
            varStr = ui->labOfDisPasswd2_1_2->text();
            ui->linEdOfCopyPasswd2_1_1->setText(varStr);
            ui->linEdOfCopyPasswd2_1_1->setReadOnly(false);
            ui->linEdOfCopyPasswd1_1_1->setText(varStr);
            ui->linEdOfCopyPasswd1_1_1->setReadOnly(false);
            // 复制到剪贴板
            this->funVoidOfclipboard(varStr);
            // 显示倒计时
            ui->lcdNumber1_1->setVisible(true);
            ui->label1_1->setVisible(true);
            objTimDJS->start();
            varIntHearbeat = 10;
            varFrontDelay = 2;
            varBackDelay = 3;
            ui->lcdNumber1_1->display(varIntHearbeat);
            return true;
        }else{
            return false;
        }
    }else if(obj == ui->labOfDisPasswd2_1_3){
        if(event->type() == QEvent::MouseButtonRelease){
            varStr = ui->labOfDisPasswd2_1_3->text();
            ui->linEdOfCopyPasswd2_1_1->setText(varStr);
            ui->linEdOfCopyPasswd2_1_1->setReadOnly(false);
            ui->linEdOfCopyPasswd1_1_1->setText(varStr);
            ui->linEdOfCopyPasswd1_1_1->setReadOnly(false);
            // 复制到剪贴板
            this->funVoidOfclipboard(varStr);
            // 显示倒计时
            ui->lcdNumber1_1->setVisible(true);
            ui->label1_1->setVisible(true);
            objTimDJS->start();
            varIntHearbeat = 10;
            varFrontDelay = 2;
            varBackDelay = 3;
            ui->lcdNumber1_1->display(varIntHearbeat);
            return true;
        }else{
            return false;
        }
    }else if(obj == ui->labOfDisPasswd2_1_4){
        if(event->type() == QEvent::MouseButtonRelease){
            varStr = ui->labOfDisPasswd2_1_4->text();
            ui->linEdOfCopyPasswd2_1_1->setText(varStr);
            ui->linEdOfCopyPasswd2_1_1->setReadOnly(false);
            ui->linEdOfCopyPasswd1_1_1->setText(varStr);
            ui->linEdOfCopyPasswd1_1_1->setReadOnly(false);
            // 复制到剪贴板
            this->funVoidOfclipboard(varStr);
            // 显示倒计时
            ui->lcdNumber1_1->setVisible(true);
            ui->label1_1->setVisible(true);
            objTimDJS->start();
            varIntHearbeat = 10;
            varFrontDelay = 2;
            varBackDelay = 3;
            ui->lcdNumber1_1->display(varIntHearbeat);
            return true;
        }else{
            return false;
        }
    }else if(obj == ui->labOfDisPasswd2_2_1){
        if(event->type() == QEvent::MouseButtonRelease){
            varStr = ui->labOfDisPasswd2_2_1->text();
            ui->linEdOfCopyPasswd2_1_1->setText(varStr);
            ui->linEdOfCopyPasswd2_1_1->setReadOnly(false);
            ui->linEdOfCopyPasswd1_1_1->setText(varStr);
            ui->linEdOfCopyPasswd1_1_1->setReadOnly(false);
            // 复制到剪贴板
            this->funVoidOfclipboard(varStr);
            // 显示倒计时
            ui->lcdNumber1_1->setVisible(true);
            ui->label1_1->setVisible(true);
            objTimDJS->start();
            varIntHearbeat = 10;
            varFrontDelay = 2;
            varBackDelay = 3;
            ui->lcdNumber1_1->display(varIntHearbeat);
            return true;
        }else{
            return false;
        }
    }else if(obj == ui->labOfDisPasswd2_2_2){
        if(event->type() == QEvent::MouseButtonRelease){
            varStr = ui->labOfDisPasswd2_2_2->text();
            ui->linEdOfCopyPasswd2_1_1->setText(varStr);
            ui->linEdOfCopyPasswd2_1_1->setReadOnly(false);
            ui->linEdOfCopyPasswd1_1_1->setText(varStr);
            ui->linEdOfCopyPasswd1_1_1->setReadOnly(false);
            // 复制到剪贴板
            this->funVoidOfclipboard(varStr);
            // 显示倒计时
            ui->lcdNumber1_1->setVisible(true);
            ui->label1_1->setVisible(true);
            objTimDJS->start();
            varIntHearbeat = 10;
            varFrontDelay = 2;
            varBackDelay = 3;
            ui->lcdNumber1_1->display(varIntHearbeat);
            return true;
        }else{
            return false;
        }
    }else if(obj == ui->labOfDisPasswd2_3_1){
        if(event->type() == QEvent::MouseButtonRelease){
            varStr = ui->labOfDisPasswd2_3_1->text();
            ui->linEdOfCopyPasswd2_1_1->setText(varStr);
            ui->linEdOfCopyPasswd2_1_1->setReadOnly(false);
            ui->linEdOfCopyPasswd1_1_1->setText(varStr);
            ui->linEdOfCopyPasswd1_1_1->setReadOnly(false);
            // 复制到剪贴板
            this->funVoidOfclipboard(varStr);
            // 显示倒计时
            ui->lcdNumber1_1->setVisible(true);
            ui->label1_1->setVisible(true);
            objTimDJS->start();
            varIntHearbeat = 10;
            varFrontDelay = 2;
            varBackDelay = 3;
            ui->lcdNumber1_1->display(varIntHearbeat);
            return true;
        }else{
            return false;
        }
    }else if(obj == ui->labOfDisPasswd2_3_2){
        if(event->type() == QEvent::MouseButtonRelease){
            varStr = ui->labOfDisPasswd2_3_2->text();
            ui->linEdOfCopyPasswd2_1_1->setText(varStr);
            ui->linEdOfCopyPasswd2_1_1->setReadOnly(false);
            ui->linEdOfCopyPasswd1_1_1->setText(varStr);
            ui->linEdOfCopyPasswd1_1_1->setReadOnly(false);
            // 复制到剪贴板
            this->funVoidOfclipboard(varStr);
            // 显示倒计时
            ui->lcdNumber1_1->setVisible(true);
            ui->label1_1->setVisible(true);
            objTimDJS->start();
            varIntHearbeat = 10;
            varFrontDelay = 2;
            varBackDelay = 3;
            ui->lcdNumber1_1->display(varIntHearbeat);
            return true;
        }else{
            return false;
        }
    }else if(obj == ui->labOfDisPasswd2_4_1){
        if(event->type() == QEvent::MouseButtonRelease){
            varStr = ui->labOfDisPasswd2_4_1->text();
            ui->linEdOfCopyPasswd2_1_1->setText(varStr);
            ui->linEdOfCopyPasswd2_1_1->setReadOnly(false);
            ui->linEdOfCopyPasswd1_1_1->setText(varStr);
            ui->linEdOfCopyPasswd1_1_1->setReadOnly(false);
            // 复制到剪贴板
            this->funVoidOfclipboard(varStr);
            // 显示倒计时
            ui->lcdNumber1_1->setVisible(true);
            ui->label1_1->setVisible(true);
            objTimDJS->start();
            varIntHearbeat = 10;
            varFrontDelay = 2;
            varBackDelay = 3;
            ui->lcdNumber1_1->display(varIntHearbeat);
            return true;
        }else{
            return false;
        }
    }else if(obj == ui->labOfDisPasswd2_4_2){
        if(event->type() == QEvent::MouseButtonRelease){
            varStr = ui->labOfDisPasswd2_4_2->text();
            ui->linEdOfCopyPasswd2_1_1->setText(varStr);
            ui->linEdOfCopyPasswd2_1_1->setReadOnly(false);
            ui->linEdOfCopyPasswd1_1_1->setText(varStr);
            ui->linEdOfCopyPasswd1_1_1->setReadOnly(false);
            // 复制到剪贴板
            this->funVoidOfclipboard(varStr);
            // 显示倒计时
            ui->lcdNumber1_1->setVisible(true);
            ui->label1_1->setVisible(true);
            objTimDJS->start();
            varIntHearbeat = 10;
            varFrontDelay = 2;
            varBackDelay = 3;
            ui->lcdNumber1_1->display(varIntHearbeat);
            return true;
        }else{
            return false;
        }
    }else if(obj == ui->labOfDisPasswd2_4_3){
        if(event->type() == QEvent::MouseButtonRelease){
            varStr = ui->labOfDisPasswd2_4_3->text();
            ui->linEdOfCopyPasswd2_1_1->setText(varStr);
            ui->linEdOfCopyPasswd2_1_1->setReadOnly(false);
            ui->linEdOfCopyPasswd1_1_1->setText(varStr);
            ui->linEdOfCopyPasswd1_1_1->setReadOnly(false);
            // 复制到剪贴板
            this->funVoidOfclipboard(varStr);
            // 显示倒计时
            ui->lcdNumber1_1->setVisible(true);
            ui->label1_1->setVisible(true);
            objTimDJS->start();
            varIntHearbeat = 10;
            varFrontDelay = 2;
            varBackDelay = 3;
            ui->lcdNumber1_1->display(varIntHearbeat);
            return true;
        }else{
            return false;
        }
    }else if(obj == ui->labOfDisPasswd2_4_4){
        if(event->type() == QEvent::MouseButtonRelease){
            varStr = ui->labOfDisPasswd2_4_4->text();
            ui->linEdOfCopyPasswd2_1_1->setText(varStr);
            ui->linEdOfCopyPasswd2_1_1->setReadOnly(false);
            ui->linEdOfCopyPasswd1_1_1->setText(varStr);
            ui->linEdOfCopyPasswd1_1_1->setReadOnly(false);
            // 复制到剪贴板
            this->funVoidOfclipboard(varStr);
            // 显示倒计时
            ui->lcdNumber1_1->setVisible(true);
            ui->label1_1->setVisible(true);
            objTimDJS->start();
            varIntHearbeat = 10;
            varFrontDelay = 2;
            varBackDelay = 3;
            ui->lcdNumber1_1->display(varIntHearbeat);
            return true;
        }else{
            return false;
        }
    }else if(obj == ui->labOfDisPasswd2_5_1){
        if(event->type() == QEvent::MouseButtonRelease){
            varStr = ui->labOfDisPasswd2_5_1->text();
            ui->linEdOfCopyPasswd2_1_1->setText(varStr);
            ui->linEdOfCopyPasswd2_1_1->setReadOnly(false);
            ui->linEdOfCopyPasswd1_1_1->setText(varStr);
            ui->linEdOfCopyPasswd1_1_1->setReadOnly(false);
            // 复制到剪贴板
            this->funVoidOfclipboard(varStr);
            // 显示倒计时
            ui->lcdNumber1_1->setVisible(true);
            ui->label1_1->setVisible(true);
            objTimDJS->start();
            varIntHearbeat = 10;
            varFrontDelay = 2;
            varBackDelay = 3;
            ui->lcdNumber1_1->display(varIntHearbeat);
            return true;
        }else{
            return false;
        }
    }else if(obj == ui->labOfDisPasswd2_5_2){
        if(event->type() == QEvent::MouseButtonRelease){
            varStr = ui->labOfDisPasswd2_5_2->text();
            ui->linEdOfCopyPasswd2_1_1->setText(varStr);
            ui->linEdOfCopyPasswd2_1_1->setReadOnly(false);
            ui->linEdOfCopyPasswd1_1_1->setText(varStr);
            ui->linEdOfCopyPasswd1_1_1->setReadOnly(false);
            // 复制到剪贴板
            this->funVoidOfclipboard(varStr);
            // 显示倒计时
            ui->lcdNumber1_1->setVisible(true);
            ui->label1_1->setVisible(true);
            objTimDJS->start();
            varIntHearbeat = 10;
            varFrontDelay = 2;
            varBackDelay = 3;
            ui->lcdNumber1_1->display(varIntHearbeat);
            return true;
        }else{
            return false;
        }
    }

    return false;
}

// 倒计时结束时的动作。
void DerForPasswdProdPanel::slot_objTimerDJS_timeout()
{
    ChMSTextCodec objTextCode;
    if(varFrontDelay > 0){
        varFrontDelay--;
    }
    if(varFrontDelay == 0){
        if(varIntHearbeat > 0){
            varIntHearbeat--;
            ui->lcdNumber1_1->display(varIntHearbeat);
        }
    }
    if(varIntHearbeat == 0){
        if(varBackDelay > 0){
            varBackDelay--;
        }else{
            QByteArray encodedString = "点击密码在此编辑，且同时复制到系统剪贴板。";
            QString varTmp = objTextCode.funQStrTextCodec(encodedString);


            objTimDJS->stop();
            DerForPasswdProdPanel::funVoidOfclipboard("",2);
            ui->lcdNumber1_1->setVisible(false);
            ui->label1_1->setVisible(false);
            ui->linEdOfCopyPasswd1_1_1->setText(varTmp);
            ui->linEdOfCopyPasswd2_1_1->setText(varTmp);
        }
    }
}

// 第一标签页 复制 按钮的单击动作。
void DerForPasswdProdPanel::on_pusButOfCopyPasswd1_1_1_clicked()
{
    QString varStr = "";

    // 锁定编辑器
    ui->linEdOfCopyPasswd1_1_1->setReadOnly(true);
    ui->linEdOfCopyPasswd2_1_1->setReadOnly(true);

    // 复制到剪贴板
    varStr = ui->linEdOfCopyPasswd1_1_1->text();
    this->funVoidOfclipboard(varStr);
    // 显示倒计时
    ui->lcdNumber1_1->setVisible(true);
    ui->label1_1->setVisible(true);
    objTimDJS->start();
    varIntHearbeat = 10;
    varFrontDelay = 2;
    varBackDelay = 3;
    ui->lcdNumber1_1->display(varIntHearbeat);
}
// 第二标签页 复制 按钮的单击动作。
void DerForPasswdProdPanel::on_pusButOfCopyPasswd2_1_1_clicked()
{
    QString varStr = "";

    // 锁定编辑器
    ui->linEdOfCopyPasswd1_1_1->setReadOnly(true);
    ui->linEdOfCopyPasswd2_1_1->setReadOnly(true);

    // 复制到剪贴板
    varStr = ui->linEdOfCopyPasswd2_1_1->text();
    this->funVoidOfclipboard(varStr);
    // 显示倒计时
    ui->lcdNumber1_1->setVisible(true);
    ui->label1_1->setVisible(true);
    objTimDJS->start();
    varIntHearbeat = 10;
    varFrontDelay = 2;
    varBackDelay = 3;
    ui->lcdNumber1_1->display(varIntHearbeat);
}

/*
 *  编辑第一标签页中间的文本编辑框触发的事件。
 *  停止倒计时，清除剪贴板。
 * */
void DerForPasswdProdPanel::on_linEdOfCopyPasswd1_1_1_textEdited(const QString &arg1)
{
    // 倒计时停止
    objTimDJS->stop();
    // 清空剪贴板
    DerForPasswdProdPanel::funVoidOfclipboard("",2);

    QString strTmp = "";
    strTmp += &arg1;
}
/*
 *  编辑第二标签页中间的文本编辑框触发的事件。
 *  停止倒计时，清除剪贴板。
 * */
void DerForPasswdProdPanel::on_linEdOfCopyPasswd2_1_1_textEdited(const QString &arg1)
{
    // 倒计时停止
    objTimDJS->stop();
    // 清空剪贴板
    DerForPasswdProdPanel::funVoidOfclipboard("",2);
    QString strTmp = "";
    strTmp += &arg1;
}

// 第三标签 十六进制 复选框 选择信号
void DerForPasswdProdPanel::on_chBoxOfSelectedHex3_0_1_stateChanged(int arg1)
{
    if(arg1 == 0){
        ui->groBOfDisPasswd3_0_1->setChecked(true);
    }else if(arg1 == 2){
        ui->groBOfDisPasswd3_0_1->setChecked(false);
    }
}

// 第三标签页 特殊符号 组 组复选框被选中后的让 十六进制复选框失去选中
void DerForPasswdProdPanel::on_groBOfDisPasswd3_0_1_clicked(bool checked)
{
    if(checked == true){
        if(ui->chBoxOfSelectedHex3_0_1->isChecked() == true){
            ui->chBoxOfSelectedHex3_0_1->setChecked(false);
        }
    }
}

// 第三标签页 生产密码 按钮
void DerForPasswdProdPanel::on_pusButOfCreatePasswd3_0_1_clicked()
{
    int varIntTmp = 64;
    varIntTmp = ui->linEdOfPasswdLenSet3_0_1->text().toInt();

    DerForPasswdProdPanel::funVoidOfDisPasswdThird(varIntTmp);
}

// 第三标签页 密码长度 输入框 检查长度数字是否合法
void DerForPasswdProdPanel::on_linEdOfPasswdLenSet3_0_1_textChanged(const QString &arg1)
{
    ChMSTextCodec objTextCode; // 中文转码

    // 消除 arg1 的警告信息
    QString varQStrElim = "";
    varQStrElim += arg1;

    int varIntPanDuan = 0;
    varIntPanDuan = ui->linEdOfPasswdLenSet3_0_1->text().toInt();

    if(varIntPanDuan>=10 && varIntPanDuan <= 2048){
        ui->pusButOfCreatePasswd3_0_1->setEnabled(true);
        QString varTmp = "";
        ui->plTexEdOfDisPasswd3_0_1->setPlainText(varTmp);

    }else{
       ui->pusButOfCreatePasswd3_0_1->setEnabled(false);
       QByteArray encodedString = "密码长度不在允许范围内！";
       QString varTmp = objTextCode.funQStrTextCodec(encodedString);
       ui->plTexEdOfDisPasswd3_0_1->setPlainText(varTmp);
    }
}

// 清空剪切板按钮 单击事件
void DerForPasswdProdPanel::on_pusButOfclipClear1_0_2_clicked()
{
    DerForPasswdProdPanel::funVoidOfclipboard("",2);
}



